In the field of computer technologies, a virtual technology is a technology that enables, by combining or segmenting existing computer resources, these resources to present as one or more operating environments, so as to provide an access manner that is superior to an original resource configuration.
In the related art, multiple X86 systems are aggregated into a virtual symmetric multiprocessor by means of software. A virtual machine monitor or a virtual machine emulator is used to implement virtualization of a physical resource of a single node, so as to provide a unified running environment. Management of a memory by a virtual machine is implemented by means of software, memories in all physical resources are logically considered as an entire memory, and the memory is divided according to a virtual page. When executing a task, the virtual machine randomly selects a task in a waiting queue, and sequentially allocates, in a logical memory, a memory address to the task according to memory space required by related data of the task, which is a mechanism in which the memory is allocated as required.
During a process of implementing the present invention, at least the following problem exists in the related art.
After data of two different tasks is allocated to a same virtual page, the two tasks simultaneously access two different addresses on the virtual page. Because a virtual machine system determines, in a unit of memory page, whether a data conflict exists, a virtual machine considers that the two tasks access the same data. As a result, the virtual machine considers that a data sharing conflict occurs between the two tasks, and interrupts execution processes of the two tasks. However, a sharing conflict does not occur actually, that is, a false sharing phenomenon occurs, which affects execution of the tasks.